package com.thomasmoerman.dci2.tmc

import com.thomasmoerman.dci2.domain._

trait MoneySink {
  
  def increaseBalance(amount: Double)
  
  def updateLog(msg: String, amount: Double)
  
}

trait MoneySinkProvider {
  
  def getMoneySink(accountId: Long): MoneySink
  
}

trait TransactionalMoneySinkProvider extends MoneySinkProvider {
  this: UpdatableAccountAspect =>
	
  def getMoneySink(accountId: Long) = new Account(accountId) with UpdatableAccount with MoneySink
	
}